home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / xc / .uni < prev    next >
Text File  |  1994-03-10  |  1KB  |  57 lines

  1. #.uni
  2. # sample script to call CompuServe, go to the UnixForum,
  3. # and enter terminal mode
  4.  
  5.     debug "on"        # turn on verbose script reporting
  6.     tty "on"        # echo received characters to screen
  7.     set bps 2400    # numbers don't need literal quotes
  8.     set proto 7E    # CIS is happier
  9.  
  10.     if ! linked; then        # dial if we haven't already
  11.         dial "9687790"
  12.     endif
  13.  
  14.     while ! waitfor "CONNECT" 35    # redial forever
  15.     do
  16.         redial
  17.     done
  18.  
  19.     pause 2                # wait for network to catch up
  20.  
  21.     # wait for a "User ID" prompt, but put a cap on how long
  22.     transmit "^C"
  23.     assign counter eq 1
  24.     while ! waitfor " ID" 20
  25.     do
  26.         incr counter
  27.         if counter morethan 5; then quit; endif
  28.         transmit "^C"
  29.     done
  30.  
  31.     pause 2                # wait for network to catch up
  32.     transmit "72160,1341^M"        # send user ID number (PPN)
  33.  
  34.     # if no "Password:" prompt in 20 seconds, bomb out
  35.     if ! waitfor "word" 20 ; then quit; endif
  36.  
  37.     debug "off"            # password protection
  38.     pause 1; transmit "goose-bumps^M"
  39.     debug "on"
  40.  
  41.     waitfor "!" 20
  42.  
  43.     transmit "g unixfo^M"
  44.  
  45.     # if we don't see "Welcome", we're not in the Forum
  46.     if ! waitfor "Welcome" 20
  47.     then                # <- NEVER forget the "then"!
  48.         transmit "bye^M"
  49.         quit            # this is total program death
  50.     else
  51.         beep            # just a personal touch
  52.     endif
  53.  
  54.     set cis on            # enable auto-startup of CIS B+ transfers
  55.  
  56.     exit                # enter terminal mode
  57.